using System;

namespace MyUtility.Utility
{
    /// <summary>
    /// GUID工具
    /// </summary>
    public static class IdFactory
    {
        /// <summary>
        /// 获取唯一ID
        /// </summary>
        /// <returns> 唯一ID </returns>
        public static int NewGuid()
        {
            var guid = Guid.NewGuid().GetHashCode();
            return guid;
        }

        /// <summary>
        /// 获取字符串类型的GUID
        /// </summary>
        /// <returns> 字符串类型的GUID </returns>
        public static string NewGuidStr()
        {
            var guid = Guid.NewGuid().ToString();
            return guid;
        }
    }
}
